<?php 
//File ini untuk menghapus record
require_once('lib/dbclass.php');
$db = new MySQL();

if(isset($_GET['id'])){
$x = $_GET['id'];

	if (! $db->Query("DELETE FROM berita WHERE id_berita=$x")) $db->Kill(); 

	echo '<script>';
	echo "alert('Success: Anda berhasil menghapus berita');";
	echo "window.location='index.php?q=3'";
	echo '</script>';
}
?>